function btnok() {

    //把所有词库写入文本框
    var wordall = [];
    for (var i in wordlistall) {
        wordall += wordlistall[i];
    }
    //待校验的列表赋值
    var wordlistnew = eval(document.getElementById("txtnewlist").value);
    //去除待插入的数组中，本身是否有重复的单词
    var tempArray=[];
    for(var i in wordlistnew){
        var flag=true;
        for(var j in tempArray){
            if(wordlistnew[i].toUpperCase()==tempArray[j].toUpperCase()){
                flag=false;
            }
        }
        if(flag){
            tempArray.push(wordlistnew[i]);
        }
    }
   wordlistnew=tempArray;
    //检查是否有重复词汇
    for (var i in wordlistnew) {
        var insertflag = true;
        for (var j in wordlistall) {
            for (var k in wordlistall[j]) {
                if (wordlistnew[i].toUpperCase() == wordlistall[j][k].toUpperCase()) { //要考虑大小写
                   
                    if (document.getElementById("txtsameword").value != '') {
                        document.getElementById("txtsameword").value += ",";
                    }
                    document.getElementById("txtsameword").value += '"' + wordlistnew[i] + '"';
                    insertflag = false;
                }

            }
        }
        if (insertflag) {

            document.getElementById("txtinsertlist").value += ",";

            document.getElementById("txtinsertlist").value += '"' + wordlistnew[i] + '"'

        }
    }
    //document.getElementById("txtoldlist").value = wordall;
}

function cleartxt() {
    document.getElementById("txtsameword").value = '';
    document.getElementById("txtinsertlist").value = '';
}